package sfsoftware.game.actor;

import sfsoftware.game.TrevorLegacy;
import sfsoftware.game.actor.attributes.Collidable;
import sfsoftware.game.trevor.ui.Dialog;
import sfsoftware.util.Actor;

public class Sign extends Actor {	
	private String signText = "";
	
	public Sign(int destX, int destY, String texture, int destWidth, int destHeight, String text) {
		super(destX, destY, texture, destWidth, destHeight);
		signText = text;
		setWalkable(false);
	}

	public Sign(int destX, int destY, String texture, int srcX, int srcY, int destWidth, int destHeight, String text) {
		super(destX, destY, texture, srcX, srcY, destWidth, destHeight);
		signText = text;
		setWalkable(false);
	}

	@Override
	public void collisionResult(Collidable object) {
		super.collisionResult(object);
		// ONLY raise a dialog box if it is the player bumping the sign.
		if(object.equals(TrevorLegacy.player))
		{
			Dialog.raiseDialog(signText);
		}
	}
	
}
